package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Schema
@Getter
@Setter
@ToString
public class InnerAreaDto {

	@Schema(description = "目的地地区编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
	@NotEmpty(message = "参数错误,编码不能为空", groups={GroupAdd.class, GroupEdit.class})
	@Length(max = 6,min = 6, message = "参数错误,编码6位", groups={GroupAdd.class,GroupEdit.class})
	private String code;

	@Schema(description = "目的地地区名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
	@NotEmpty(message = "参数错误,名称不能为空", groups={GroupAdd.class,GroupEdit.class})
	private String name;
}
